attempt to fix random deletion bug (can't reproduce easily, so can't tell if it's fixed easily)