fixed bug with childs exit