Fixed error in the way iteration steps are stored.
Basically now the currentStep array is dinamically allocated.