Added patch to sanitize external solver criteria.