Fixed solve algorithm