Fixed error when deleting non-asset documents.