fix js error on homepage