Fix inheritance and class attribute.