deal with deleted docs