Brainfart fix for encodeInteger that should be encodeGauge