Repair tmlists function