Ah...the torus distance calculation is wrong. Will fix on other system. BRB.