Fixed velocity update bug in apply_generalized_impulse()