minor bug fixes. now pdflatex works 100 per cent