IE fixes

Probably needs testing.