changed saving and change the status of the document
Merge branch 'bug2133' into bugfix