fix dual solution computation