Altering gallery sort