Fixed the javascript and html