Corrected Quit-button behaviour