Modified MexWrapperGen

Modified the getter functions .