correct check for numbers during sort, partial fix for bnc #885278