Small fixes
Improved compatibility with html5