Fixed read only bugs