Fixed a bug with what might have been an unsaved file.