Close #55: Fixed some problems when the .attachments is updated