Fixed runQuery() not working properly