fix KMP