fixed adjacency bug