fixing latex bug