fix bugs for Print and Export