Fix be able to export document that have not been saved