Fixed bug with NPE when clicking outside game window and then returning back