fix one bug exporting pdf and png