corrected bug in KNPK