fix out of range case in getParameterDefinition #368