fix stage numbers
from aludetect