Fixed some bugs + new PDF export