Added removeStageReference fix