Fix NPE and typos in rscPermissions.