sort points, fixes for points calculation