added missing flush

added missing flush