small bug fix in solver