fixes re-render problem on sort