Fix sign problem
Some fixes