Changes made to saving permissions. Currently broken