Fixed a crash with the Application