Fixing bugs in solver: 3