fix bug syncing attachments