Fixed issue with stage1 when stages are not run consecutively