fix attribute reading