fixing the support of new params on IO.foreach