adding a line to import_attachments to fix race condition