Fixed bug in robot.py