Fixed bug in row iterator