bug: correcting the neighbors search

It was returning repeated neighbors