adding if case for attachment header