fix flush when output to --pager