Fixes a js error on pasting in IE11.