optimizations and IE fix