fix #4;wrong usage at stream.read