Fix bug in servlet input stream read method