Fixed wrong distance/kernel correspondence