fix grid sort