update signs on optimization