Forcing stream into old mode before pipe to avoid issues on CI server

Issue #349