Fixed `InvalidStateError: DOM Exception 11` error