fix typo [skip ci]
add test for retrieving rowid of last row