Pass the query name

Fixes #2