Fix message resubmission. Closes #18.