fixed some bugs in new process