fix params in loops