Fix the cleanup method in the run_checks