Small fixes to robot.js