fixed display error when using classes.