Fix for LaTeX and Java