fixes unit test on hooks