Fixed a typo in a variable name
Fixed bugs in index.html construction