Fix decoding of numeric values in binary format. Fixes #5 and #6.