Fixed a bug in the domain stuff.