fix bug in getting all class fields