Merge pull request #749 from Stefan-ST/fix-740

Fixes #740 Update Attachment Makes Orphaned Attachment