Fixed error after reassigning the parameter indexes