fix bug when publish