Non-exhaustive match fix to original sort_nth_digit