Fix current document name and modified state.