     }
     
     func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+        if string == "" {
+            isBackspace = true
+            return true
+        }
+        
+        isBackspace = false
+        
         // Dont allow multiple periods, anything below 0 or above 100
         if textField === weightField {
             let newChars = CharacterSet(charactersIn: string)
             let isNumber = CharacterSet.decimalDigits.isSuperset(of: newChars)
             if isNumber {
-                let current = textField.text! + string
+                let current = textField.text!.replacingOccurrences(of: "%", with: "") + string
                 let num = Double(current)
                 if let n = num,  n > 100.0 || n < 0.0 { return false }
             } else { // Allow only one decimal
                 if string == "." {
-                    let current = textField.text! + string
+                    let current = textField.text!.replacingOccurrences(of: "%", with: "") + string
                     let num = Double(current)
                     let count = textField.text!.components(separatedBy: ".").count
                     if count > 1 { return false }

        return true
    }
    
    override func layoutSubviews() {
        // Remove these views and redraw them
        nameField.removeFromSuperview()

    var promptLabel: UILabel!
    var nameField: UIFloatingPromptTextField!
    var weightField: UIFloatingPromptTextField!
    var isBackspace = false
    
    private lazy var plusLayer = CAShapeLayer()
    private lazy var buttonGesture = UITapGestureRecognizer()
