Fixed getattr for class attributes