fix for no function in loop