Fixed bug with iterations over a value