fix(ode_solver): polarity check for invariants was succeeeding for negative invarinants