Fixed bug when creating a class.