Fix bug in parse.c
Fix a few bugs in process.c, more are still there.