Fixed javascript issues on the homepage.