Bug fix for big decimals

len(buf) was recalculated and skips the last 4 bytes from the buf