fix grabbing wrong attribute