Fixed the javascript