fix pdf generation bug