Add some checks around global hooks