fix bug with multiple topics