Fix a bug in NextRow.