Fixed error for the unsaved documents