Fixed generator bug (issue )