fix attachments uploading