improve table sorting, partial fix bnc #885278

Braces not needed.