Added sorting consistency