final fix to affine gap alignment solver.