Fix attribute ID checking