fixed bugs in robot.* and server.cpp (due to robot.*)