fix compatibility with multistage