when-to-select logic was incomplete and overly eager
set pipe buffer correctly(fix typo)