fixing bug for displaying the attachments