Fix test_hooks.