Fixed a bug with cor_auto