fix bug sort