Bug fix in ko analysis