Some modifications to hook.