Fix potential race condition in Subscribe