fix for ie and optimize