fix busted pending deletion code that was causing crashes