fix attachment rendering for preview