Fix memory leak, add observe.