fixed problem with empty domains