fixes for IE8 JavaScript issues