really fix sorting problem