Fix bugs in DeleteKeysCLI

Fixed a few bugs in DeleteKeysCLI