Fix messaging encoding