Fixed the bugs with errors emited by the child process.

finally!