Fix LaTeX compiling problems