Fixing bugs in read-write permissions.