Fix attribute handling