Add support for Nth query, fixes #18