You can't do this
while(!(t1_changed && t2_changed))
because both variables occupy two bytes and part of the value could be changed by the ISR while you are reading the values
Do it like this
if (t1_changed == true) {
noInterrupts();
t1Copy = t1;
newT1Copy = true; // not sure if this is needed
t1_changed = false;
interrupts();
}
if (t2_changed == true) {
noInterrupts();
t2Copy = t2;
newT2Copy = true;
t2_changed = false;
interrupts();
}
and then in the rest of your code use t1Copy and t2Copy
...R