fix write issue.