Update main.pas

Life 9.4
Now newStage and oldStage are same type variables.