fixed the check for the domain