Fix bugs and add new sort for pointset (For test)