calculation error when reducing amount