bug in neighbor finding