fixed bug in resRobot.js