Fixed js errors.