Fixed some warnings on mac when using the robot window.

Fixed some warnings on mac when using the robot window.