Fix class number refresh issue