bug fix publisher function