Fix stride and distance output