cleanup code after general check