fix publish method