Fixed IE8 bug, and updated demo to work in IE8