Fixed bugs with index.html template