Fixing bad function in updateDomains.