Make sure hooks are executed properly