All ie fixes

This is a combination of #1096, #1097, #1099 and #1115 into one giant PR so that they can be tested as one.