IE8 fix, closes  #172, closes #173