Fix updatePermissions.