fix bug in Python kinematic