Corect the order of part list when doing tutorials

Change the foreach loop of the parser to a while loop (it's for go backward sometime in the parsing)