fix some bug for astream writ cache