improvements for html5 rendering