fixed js errs