fix bug in topic.py