Fix race between cleanup and inspect/ps