fixed a bug in the computation of grid strides
O_o the test I wrote to check the stride computation was wrong this entire time. Can't believe such a core bug went unnoticed all these years.