fix read only issue