Fix repeating fields being lost when message is resend

Fix issue #95.