Fixed uncaught null-pointer exception; no longer crashing on exit