fixing the javascript which was breaking everything