fixing attribute reading