Sorted the selectedSensors array to always have the same order