avoid infinite loop with invalid messag envelopes
convert version and id to strings in Envelope
add Message and Envelope specs