fix bug where gip_params is partially overwritten after the first pass of the main block