Fix unregistering specific hooks