Fixed publish/unpublish button not working right