Fixed export to pdf issues.