Fixed wrong arithmetic operation for d-term.