protect attributes being dictionaries