Fixed bug in attachment delete feature.