Fix some write error.