Fixed issue with cleanProc function