more accurate key deletion