Fix calling of hooks.