Preventing more crashes in solver code