Added sorting to affect model sorting.