fix DOM Exception 12 in Chrome