move TH constraint to the correct place