Correct TC averaging script