fixed bug - attachment content was getting overwritten