Fix bug making it impossible to delete documents

Process empty documents for delete operations.