bug fix for js on homepage