fix for decimal, add tests