Fixed a document.ready bug with Internet Explorer