fixed removing attachments from database and filesystem