Fix reading attribute from the correct place.