fixed deallocation bug in ric mhe octave mex