bug fixed (distance.table call)
urgent bug fix (oppose GUI)