fixed bug in BD integrator