fix pdf and history