Not a js expert, but this may fix the homepage