Add missing cleanups to defaulted_query and prompt_for_continue