Fix end velocity bug
Fixed bug in velocity fix.