Fix incorrect event being printed on QUIT.