Fixed broken onclick event in IE8, closes #858