fix for loops with method parameters