Fixed some bugs with html5 support.