Fix TE logic and recipes