This wasnt correct since we're not reading past the stream, though it worked on Linux and some Windows systems.