Corrected a callback error in flush.