timestamp and encoding fixes
fixed payload in envelope