fixed bug to save attachment metadata
Merge branch 'hotfix' into develop