fixed empty domain error