Fix app crit bug when pipe streams