fix various bugs on the robot