Corrected reading using stream iterator