Added support of multiple children in non-pthread mode