fix: bug in deleting unused key