fix bug for data pattuples