     
     @IBAction func onAllClearTapped() {
         onClearTapped()
-        previousValue = 0
+        previousValue = nil
         currentOperator = nil
         highlightOperationButton()
     }

        resultLabel.text = readableString(solution)
        
        if resultLabel.text == NSLocalizedString("Number too large", comment: "Number being too large") {
            previousValue = 0
        } else {
            saveToCoreData()
            previousValue = solution

            return nil
        }
        
        guard let firstValue = previousValue else {
            return nil
        }
        
        switch solutionOperator {
        case plus:
            return firstValue + secondValue
        case minus:
            return firstValue - secondValue
        case multiply:
            return firstValue * secondValue
        case divide:
            return firstValue / secondValue
        default:
            return nil
        }
