Fixed a bug in optimset for CORDEX