POssible fix for TG code