fixed the way app exists when an error is thrown