updated html5 handling