fix bug always persist class