Fix stream_wrapper requires full namespace
Fix incorrect variable name