set domain var correctly