Fixed bug getting rulesets for permissions