Override stop method to stop the program closing on x.