Fixed bugs in auto check