fixed a but in t detection measure