temporary fix for fatal error on DOMElement