Fixed bug with it not working in IE7 and IE8