Fix JS errors.