Fixed bug in reading data from InputFromBuffer with little portions: buffer pointer didn't move during reading.