fix a bug with topic replacement and topic updates