                     self.keyStore.testOptionalValue = DefaultsKey<Serializable?>("test", defaultValue: self.defaultValue)
 
                     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[\.testOptionalValue] = self.customValue

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


                    self.keyStore.testOptionalValue = DefaultsKey<Serializable?>("test2")

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

