Better fix for the export dialog.

Replace: 04a67b3a and 2d1954c6.
(cherry picked from commit 41a5da389b00b5b8bc9246a377667b68f011947d)