Fixed an issue in the way primary topics are selected