fixed bug with container not resizing when going from descendant to ancestor, but need to refactor