Fixed bug in IE compat