Various CLI fixes