Fix class-variable issue