fixed the neighbors management.