Fix for iteration on variables