Fix input stream reader