Fixed an adjacency testing bug