Fix usage of LOCAL and HOOK