fixed sigchld handler