corrected binstream.js