Fixes for make-pdf script