Fixes the flawed set topics generation logic.