Addresses problem with correctly calculating whether attachments are pre...

...sent