Fix environment errors.