fix premature unicode decoding