fix decoding of signed integers