Sorting layers fixed