Fixed bug when reading clas attributes