fixed a minor bug

wrong behavior when input had decimals but variable 'decimals' was 0

Sorry about that.. fixed