Fixed document deletion to remove entry from index