fix DOM reference bug