                     }
                     return counterValue
                 },
-                defaultTo: 0) {
+                defaultTo: defaultCounter) {
                     return .Counter(counter)
             }
         } else if string == kFactorTimerKey {


private let defaultAlgorithm: Generator.Algorithm = .SHA1
private let defaultDigits: Int = 6

private let kOTPAuthScheme = "otpauth"
private let kQueryAlgorithmKey = "algorithm"

                    }
                    return NSTimeInterval(int)
                },
                defaultTo: defaultPeriod) {
                    return .Timer(period: period)
            }
        }
