fixes errors in parent children structure