fixed "Uncaught Error: IndexSizeError: DOM Exception 1"