Fixed size bug in generator