waitpid fix