Fix registration of hooks

Broken by 357d7fbb953841f82cfe2f17fbabf83dd0eae94f