fix issue where head of output stream had no error listener