fixed a minor bug when using decimal