HTML5 fix for demo
Optimization