fix a flush error