Fix #321 Adding a "tag" to queryCompletionListener and queryFailureListener

refs #321