Fix the bug that class information may lose.