some fixes for html5 support