Fixed deleting of objects