Fixed cmake crashing after secondary run.