fixed the bug of overlapping points