fixed bug in latex templates