Made publish functions return bool