fixed the javascript to run actually