Fixed homepage js error