Made the application actually quit by itself