Fixing bugs in  Flip Sign