Fix incorrect encoding of DispatchMessage type