fixes for removing children from parents on unload