Adjusted for IE7 compatibility