fix unit tests
fix direct call to hook