js error corrected