fixes for attachments