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

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