update fix error with delete and write context