Fix for compatibility with Internet Explorer 7 and 8

This is the only fix needed to work under IE 7 and 8