Added sorting for sessions.'