#1153 Fix check for sorting change