Fixed broken commit. Added velocity robust for x (identical code for y)