Fixed neighbor allocation bug