Fix read only bug