deal with the fact that some attributes may not exist.
(need to do that automatically...)