Catch the range error
Fix the DOM mutation issue.