Fixed TE bug