fix DOM exception in Chrome