Update last_stage to last_state