fix bug before pattuples production