Fixed bug when trying to delete a site tree.