fix stage script