minor corrections to permission system