Fixed problems where duty for motors were being set to bad values