Fixes binary data truncation bug. Fixes #34.