Fix memory corrution in comb gen