Fix js error preventing chart display