fix bug on latex support