Fix sample generator