add code to reproduce afer_class bug