Improved settings sort