Some fixes to nearest neighbors to wor in benc