getMainProcess seemed to be wrong. Fixed