fixed issues in QueryAsync