Fixed bug where info panel would still be open even after the document got deleted