fix clearing attrs