some fixes for tex