fixed bug for sort options