applying doug's patch to handle odd nil arguments in parse_stream