Fix class attribute handling.