KMP fix