fixed annoying bug in ode solver