quicker and dirtier fix
Merge pull request #1 from datasift/feature/fix_insufficient_buffer_crash

quicker and dirtier fix