prevent js error in alt cards page