WORDS-8 fixed bug with not valid sorting

WORDS-8 fixed bug with not valid sorting