fixed concurrency problem with distanceTable, closed channel in sample publisher