fix for document save