fixes for velocities and acceleration calculations