Fixed: edit function was sending read and write permissions separately.