                 oldTextField.previousTextField = nil
             }
 
-            objc_setAssociatedObject(self, &NextTextFieldKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
+            objc_setAssociatedObject(self, &NextTextFieldKey, WeakObjectContainer(object: newValue), objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
             assignInputAccessoryView()
 
             if let newTextField = newValue {


    weak public internal(set) var previousTextField: UITextField? {
        get {
            return objc_getAssociatedObject(self, &PreviousTextFieldKey) as? UITextField
        }

        set {
            objc_setAssociatedObject(self, &PreviousTextFieldKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
            assignInputAccessoryView()
        }
    }


    @IBOutlet weak public var nextTextField: UITextField? {
        get {
            return (objc_getAssociatedObject(self, &NextTextFieldKey) as? WeakObjectContainer)?.object as? UITextField
        }

        set {
