Fix global/local hooks inversion