Fix bugs in IE8