Fix bug with CoreProtect