fix dom exceptions