fix concatenation of samples