Fix callback in for loop bug.