Minor logic bug fix

isGenerated check causing extra generation.