more fixes for arbitrary data on attachments