Fix the publishing consumer code