fix delete problem for non-existing records