fixing latex errors