Fixed issue with NPE when clicking outside game window and then back inside