Fixes #136 and the latexcodec issues