Fixed a previous bug that getting the wrong end for a pair of sites