Use loop for acceptParams (#6066)