Corrected js error