Backported IE fix from 374