fix to iterating over rows; ensures vectors can be iterated over properly