Doesnt crash on exit button now, but still throws nullpointer on startup