Fixed compare_velocity