fixed bug of auto cal