Fix sign problem in Dec calculation