Fix bugs in email timestamp substitution
Fix bugs in UI updates