Fixed a bug in IE7 and IE8