Added some thread safety to internal observable implementation