changed stages_max