Fix #16: Query identification support