Trying to make cplex adapter more robust.