Fixed some things for IE8 compatibility