fixed observer. when the state is changed, the node is updated appropriately.