fixed attachments in database.