Fixed velocity bug in python version.