Changed the memory protection check when creating a hook. (experimental)