Fix decimal calculation error