Fix bug where no domains element is supplied.