Fixed a serious bug in the decodeVarint function.
Removed forgotten debugging output.