KMC.R

bug fix.