Fix generateStringWithSeed