fix big bug in outputting stream text---it was only printing the first message.