Add core patch to fix errors when granting perms