bug fix in demo.html