fixed a minor bug: wrong behavior when input had decimals but variable decimals is 0
Merge pull request #4 from Zekvyrin/master

fixed a minor bug