Quit button bug fixed