Fix t loop bounds