Fix js error on archive page