fix potential garbage publishing