Fixes an issue with clearing rules in permissions