fix for chrome ("Uncaught Error: NotFoundError: DOM Exception 8")

Uncaught Error: NotFoundError: DOM Exception 8