Remove hook on pre-command-hook.