fixing polymorphic updateValue