Fixing bugs in solver: 4