small fix in the neighbour extracting algorithm