Added IE 7 and IE 8 compatibility fixes