fix bug where z.csv was identical to y.csv