Fix bugs: email template and timer