fixed a js error