Fix segfault by child_init