Clamping velocity if necessary