Some fixes to the hooks.