fixed a small bug when two consumers read in parallel