qmt_get_query "improvement"

Small fixes