fix console errors when generating arg list for lapply-ed functions