CLI: fix bug with "-k" option.