Fixed crash when getting list of attachments