Fix bug with SIGCHLD