fixed null pointer when default for perm is missing