similar bugfix in DOM.__init__