fix error in rowsAsHashes generating a segmentation fault