make grid sort to be stable. fix #1.
(cherry picked from commit a9612d9)
apply #1 to min.js