fixed errors with child pid