fixing javascript errors in IE.