fix bug with empty domains