fix affine param search bug