fix a bug related to options.length in ReadStream

also clearing out the code to make the logic obvious