Remove the right hook.

The code was removing a hook that was not added, with the result that
the hook was not actually being removed.