fixed bug in string queryCommand