Fix read_attribute protection.