Update process.c

Some bugs fixed.