[bugfix] Saving the same resource twice failed on a dead connection