Fixing publish code