fix write result