Updated reset function to reset attachments