fixes to sqs encoding. Closes #4.