Fixed sort issue