Fixed issues with decoding decimals

When there were only fractions there were negative substring lengths, and negative numbers with only fractions did not work either.

This fixes #33