fix delete crash