Avoid bad values of stride.