Latex bug fixes