fix bug in index calculation for neighbour generation
0.1.1