Add pdf, fix bugs.