fixed bug in smarts query tool constructor