fix api sort