fixing a delete attribute bug