Fixed bug in for iteration