Fix JS error in IE8