fix js crash when creating a new topic