fix crash if no domain