Backported child shutdown fix