Fixed some flushing issues.