several fixes for integrator