Fixed loop variable issue in SW inside commitstage