                     defaults[\.testOptionalValue] = self.customValue
 
                     var update: DefaultsObserver<Serializable?>.Update?
-                    let observer = defaults.observe(\.testOptionalValue, options: [.initial, .old, .new]) { receivedUpdate in
+                    observer = defaults.observe(\.testOptionalValue, options: [.initial, .old, .new]) { receivedUpdate in
                         update = receivedUpdate
                     }
 

                    defaults[key: key] = self.customValue

                    var update: DefaultsObserver<Serializable?>.Update?
                    let observer = defaults.observe(key, options: [.initial, .old, .new]) { receivedUpdate in
                        update = receivedUpdate
                    }


                    self.keyStore.testValue = DefaultsKey<Serializable>("test", defaultValue: self.defaultValue)

                    var update: DefaultsObserver<Serializable>.Update?
                    observer = defaults.observe(\.testValue, options: [.initial, .old, .new]) { receivedUpdate in
                        update = receivedUpdate
                    }

