Fix create_topic_buttons bug

See comments for explanation.