Fixed selection logic. Lexigraphically sorting numbers is no bueno :3