Added optimisation so that a global disable is more performant.