fixing compiling errors on latex paper