fixed: error in kde detection.