         let inputText = sender.titleLabel!.text!
         let currentText = resultLabel.text!
         
-        if currentText == zero || calculator.currentValue == nil {
+        if currentText == zero || calculator.currentValue == nil || calculator.solution != nil {
             resultLabel.text = inputText
         } else {
             resultLabel.text = currentText.appending(inputText)

    }
    
    @IBAction func onOperationTapped(_ sender: CalculatorButton) {
        if calculator.currentValue == nil {
            calculator.previousValue = calculator.solution
        } else {
            calculator.previousValue = calculator.currentValue

            calculator.previousValue = solution
        }
        
        clearOperationButtonHighlight()
    }
    
