fixed another crash when sorting a vector.