ixed error in mcNNindex in case k=1