Fixes RegisterHooks::hook()