Fixed a couple of errors from the first prototype
PDF export