fixed queries errors for domain level