Fix data race on child creation