fixes for the iteration

Signed-off-by: Vladimir Vidinliev <v.vidinliev@gmail.com>