Remove permissions before saving them
Remove permissions before saving them
Some minor renaming + bug fix