correct the domain check