fix(base): functions in loops