Fixed bug where program wouldn't exit due to catching all exceptions