fix written error