I just wanted to verify which order you put the rows of the Jacobian. If your initial variables are (x,y) and change to new variables u(x,y)=f(x,y) and v(x,y)=g(x,y), then you'll get a Jacobian. If this Jacobian is negative, would you change your definition to u(x,y)=g(x,y) and v(x,y)=f(x,y)...