fix bug in selector.nearAdjacent, use tuples