fix characters decode

Fixes issue #5