fixed unit velocity bug