add ability to remove close hooks from QueryContext