Fix output buffer issue.