Removed race condition in observe.