fixed tex bug