correct a looping error in processing input parameters