Fixed HookManager problems, added new internal permission checking system