fix tuple order