fixed some errors in foreman integrator