Fixed problem with null stageId