hotfix for message index where topic can be nil, properly handle if happen