Fixing bug with creating topics in script