Added minor improvement in functional KMP core part