fix query/wait emitted twice
Merge pull request #831 from metamx/fix-query-wait-emmitted

fix query/wait being emitted twice