fixed a bug with initial params not being taken into account