add extra checki

current the system seems to be breaking if there is domain specified