changed the way the PID was being determined. I'm now using feature('GetPid') from the undocumented part of MATLAB... seems to work though.