There are 2 options. The first is sort it always within the controller. The second one is check only if both values are included.