Slight writing issue fixed

Only wrote the child of the basin. Now writes the child of that child
and so forth..