fixes for IE8, see #16