fixed the javascript to make it work again