Fix save for attachments

Bug introduced with 51037be7fb19515fb5fd18655be4fb995f551096
Merge pull request #492 from zakkak/master

Fix save for attachments