fixed bug with coordinate system for velocity