Fixed clearing of figures in export.