Fix a bug that specified parameter index is wrong.