         
         switch errorType {
         case .WIKITEXT_UPLOAD_ERROR_NEEDS_CAPTCHA:
-            if mode == .PREVIEW_MODE_EDIT_WIKITEXT_CAPTCHA {
+            if mode == .captcha {
                 funnel?.logCaptchaFailure()
             }
             

    var abuseFilterCode = ""
    var summaryText = ""

    var mode: WMFPreviewAndSaveMode = .PREVIEW_MODE_EDIT_WIKITEXT_PREVIEW {
        didSet {
            updateNavigation(for: mode)
        }
    }
    let wikiTextSectionUploader = WikiTextSectionUploader()
    
    func updateNavigation(for mode: WMFPreviewAndSaveMode) {
        var backButton: UIBarButtonItem? = nil
        var forwardButton: UIBarButtonItem? = nil
        
        switch mode {
        case .PREVIEW_MODE_EDIT_WIKITEXT:
            backButton = buttonLeftCaret
            forwardButton = buttonNext
        case .PREVIEW_MODE_EDIT_WIKITEXT_WARNING:
            backButton = buttonLeftCaret
            forwardButton = buttonSave
        case .PREVIEW_MODE_EDIT_WIKITEXT_DISALLOW:
            backButton = buttonLeftCaret
            forwardButton = nil
        case .PREVIEW_MODE_EDIT_WIKITEXT_PREVIEW:
            backButton = buttonLeftCaret
            forwardButton = buttonSave
        case .PREVIEW_MODE_EDIT_WIKITEXT_CAPTCHA:
            backButton = buttonX
            forwardButton = buttonSave
        }

        captchaViewController?.apply(theme: theme)
        wmf_add(childController: captchaViewController, andConstrainToEdgesOfContainerView: captchaContainer)
        
        mode = .preview
        
        let vc = EditSummaryViewController(nibName: EditSummaryViewController.wmf_classStoryboardName(), bundle: nil)
        vc.delegate = self
