Make detectedStage into a static