Added check for existence of parent domains