Fixed shocking bug in domain query

Change-Id: I89c7a8325fca59bdd79fd878af6749ab8f42222c