Don't call clear_quit_flag after check_quit_flag