fix shallow copy of attributes