corrected errors in statevar and stateparam structures