fixing empty attachments