handle domains for empty data sets; fixes #296