fixed class definition generation