Properly encode message form. Closes #68.