fixed bugs for index.html for hw6