Fixed bug where the container would get destroyed after calling destroy.