Make sure strides have positive values before converting.