Two routines on neighbors. Bugs fix.