fix pdf and formatting issues