py3: fix streams