fixed the cmake env var so it restores the env vars after it runs