Improve domain selection; fixes #8