Fixed bug in print JS Closest Pair