[kcm] add some robustness