Fix a bug when using class_name