Remove hooks when minibuffer exit