Fix saving permissions on save