Fixed deleting documents