Fix quit button bug.