Fixed bug when reading data from buffer queue with more than one buffers