patch to not break on attachments with no file extension