fix write