Fixed bug when read buffer is smaller then internal segmented buffer size.