Fixed generator creation bugs