Added a check that prevents a crash if a stage hasn't been run