Fix compilation errors

Now works with pdflatex.