Fixed an issue where permission rows were kept getting added instead of replacing the lower access ones