Remove old attributes before adding new ones.